package com.tongqin.distributed.client;

import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.springframework.kafka.listener.MessageListener;
import org.springframework.stereotype.Service;

/**
 * @author yuantongqin
 * @date 2018/7/27 下午4:23
 */
@Service
public class RegistryListener implements MessageListener<Integer, String> {

    @Override
    public void onMessage(ConsumerRecord<Integer, String> integerStringConsumerRecord) {
        System.out.println("收到消息了");
        System.out.println(integerStringConsumerRecord.value());
    }
}
